package spindles.api.domain;

import static com.sleepycat.persist.model.Relationship.ONE_TO_ONE;

import com.sleepycat.persist.model.Persistent;
import com.sleepycat.persist.model.SecondaryKey;

@Persistent
public class Role extends DomainObject{
	
	/**
	 * 
	 */
	private static transient final long serialVersionUID = -5201797007181862756L;

	@SecondaryKey(relate=ONE_TO_ONE)	
	private String name;
	
	private String description;
	
	public static final Role GUEST = new Role("guest", 
			"This role cannot perform certain administrative tasks.");
	
	public static final Role ADMIN = new Role("admin", 
			"This role has no restrictions.");
	
	public Role(String name, String description){
		this.name = name;
		this.description = description;
	}
	
	private Role(){};

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

}
